// ignore_for_file: file_names

import 'package:flutter/material.dart';

class MyApp4 extends StatelessWidget {
  const MyApp4({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        // 1.1 导航
        appBar: AppBar(
          title: const Text('Container组件'),
          backgroundColor: Colors.pink,
        ),
        // 1.2 主体内容
        body: Container(
            width: 300,
            height: 300,
            // color: Colors.blue,
            // 设置对齐方式
            // alignment: Alignment.center,
            // alignment: Alignment.bottomCenter,
            alignment: Alignment.centerLeft,
            // 设置边框和圆角
            //一旦用了decoration, 背景颜色要放到里面
            decoration: const BoxDecoration(
                color: Colors.blue,
                // 设置边框
                // border: Border.all(
                //   color: Colors.red,
                //   width: 5,
                // ),
                // 设置左边框
                border: Border(left: BorderSide(color: Colors.red, width: 10)),
                borderRadius:
                    BorderRadius.only(bottomRight: Radius.circular(20))),
            // 内边距
            // padding: const EdgeInsets.all(10),
            padding: const EdgeInsets.only(left: 0),
            // 外边距
            margin: const EdgeInsets.all(20),
            child: const Text('我是Container组件')));
  }
}

// Column().padding().margin().borderRadius()
